from django import http
from django.contrib.auth.mixins import LoginRequiredMixin

from utils.response_code import RETCODE


class LoginRequiredJsonMixin(LoginRequiredMixin):
    def handle_no_permission(self):
        return http.JsonResponse({'code':RETCODE.SESSIONERR,'errmsg':'未登录'})